app.provider('appService', function(){
    var that = this;
    
    that.version = 0.1;
    
    that.lang = "gb";
    
    that.i8n = {
        "fr" : {
            "home" : {
                "pageTitle" : "Page d'accueil"
                , "labelKPIContent" : "Les indicateurs services"
                , "labelLik" : "Les liens utiles"
                , "labelTeam" : "L'équipe"
            }
        },
        "gb" : {
            "home" : {
                "pageTitle" : "Home Page"
                , "labelKPIContent" : "The KPI"
                , "labelLik" : "Useful links"
                , "labelTeam" : "The team"
            }
        }
    };
    
    return {
        setVersion : function (value) {
          that.version = value;
        },
        $get: function () {
            return {
                version : that.version + " Version",
                lang : that.lang,
                /**
                * @name getVersion
                * @returns {String}
                */
                getVersion : function() {
                    try {
                        return that.version + " la version";
                    } catch (er) {
                        console.log(er.message);
                        return null;
                    }
                },
                /**
                * @name getVersion
                * @returns {String}
                */
                getVerbose : function() {
                    try {
                        return that.i8n[this.lang];
                    } catch (er) {
                        console.log(er.message);
                        return null;
                    }
                }
            };
        }
    };
});
